package com.bruce.learnrecylerview.app.base;

import android.app.Application;
import android.content.Context;
import com.bruce.learnrecylerview.app.dagger.Component;
import com.bruce.learnrecylerview.app.dagger.DaggerComponent;
import com.github.bluzwang.aopcache.cache.CacheUtil;


/**
 * Created by Bruce-Home on 2015/8/23.
 */
public class BaseApplication extends Application {

    private static Context context;
    @Override
    public void onCreate() {
        super.onCreate();
        context = this.getApplicationContext();
        component = DaggerComponent.create();
        CacheUtil.setApplicationContext(context);
        CacheUtil.setNeedLog(true);
    }

    public static Context getContext() {
        return context;
    }

    private static Component component;
    public static Component getDagger() {
        return component;
    }
}
